home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / IDE / SUBARTIC / SUB_ARCT / TEST / SHADOW_D.JAV < prev    next >
Encoding:
Text File  |  1996-10-04  |  2.3 KB  |  78 lines

  1. /*
  2.  * $Id: shadow_drag_test.java,v 1.12 1996/10/04 03:15:39 hudson Exp $
  3.  * $Author: hudson $
  4.  */
  5.  
  6. package sub_arctic.test;
  7.  
  8. import sub_arctic.lib.interactor_applet;
  9. import sub_arctic.lib.debug_interactor_applet;
  10. import sub_arctic.lib.manager;
  11. import sub_arctic.lib.interactor;
  12. import sub_arctic.lib.interactor_consts;
  13. import sub_arctic.lib.base_parent_interactor;
  14. import sub_arctic.lib.top_level;
  15. import sub_arctic.lib.icon;
  16. import sub_arctic.lib.line_display;
  17. import sub_arctic.lib.shadow_drag_container;
  18. import sub_arctic.output.loaded_image;
  19. import java.net.URL;
  20. import java.net.MalformedURLException;
  21.  
  22. public class shadow_drag_test extends debug_interactor_applet 
  23. implements interactor_consts {
  24.  
  25.   public void build_ui(base_parent_interactor top) 
  26.     {
  27.       interactor child, child1;
  28.       shadow_drag_container drag;
  29.       
  30.       try {
  31.     drag = new shadow_drag_container(0,0);
  32.     // drag.set_expensive_draw(true);
  33.     top.add_child(drag);
  34.  
  35.     //netscape 3.0 is seriousl broken here so we load direct from the URL
  36.     loaded_image img_fix = manager.load_image(
  37.       new URL("http://www.cc.gatech.edu/gvu/ui/sub_arctic/gvu.gif"));
  38.     
  39.     //child= new icon(10,10,manager.load_doc_image(this,"images/gvu.gif"));
  40.     child = new icon(10,10,img_fix);
  41.     drag.add_child(child);
  42.     
  43.     //child= new icon(75,25,manager.load_doc_image(this,"images/gvu.gif"));
  44.     child = new icon(75,25,img_fix);
  45.     drag.add_child(child);
  46.     
  47.     child = new line_display(170,10, 370,95, 2);
  48.     drag.add_child(child);
  49.  
  50.     child = new line_display(170,95, 370,10, 2);
  51.     drag.add_child(child);
  52.     
  53.     child = new coord_tracker(10,100,
  54.                   "Shadow drag any interactors! [","]");
  55.     drag.add_child(child);
  56.       } catch (MalformedURLException e) {
  57.     showStatus("Problem loading image:" + e);
  58.       }
  59.     }
  60. }
  61.  
  62. /*=========================== COPYRIGHT NOTICE ===========================
  63.  
  64. This file is part of the subArctic user interface toolkit.
  65.  
  66. Copyright (c) 1996 Scott Hudson and Ian Smith
  67. All rights reserved.
  68.  
  69. The subArctic system is freely available for most uses under the terms
  70. and conditions described in 
  71.   http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html 
  72. and appearing in full in the lib/interactor.java source file.
  73.  
  74. The current release and additional information about this software can be 
  75. found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
  76.  
  77. ========================================================================*/
  78.